package com.hcy.rabbitbasicmodel.enums;

/**
 * @Author huchenying
 * @Description
 * @Date 2021/12/27 17:32
 */
public enum OrderServiceType {
    CURRENT(1,"实时订单"),
    APPOINTMENT(2,"预约订单"),
    RECV_PL(3,"接机单"),
    PUSH_PL(4,"送机单");
    final int code;
    final String desc;
    OrderServiceType(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
    public String getDescByCode(int code){
        if(code == CURRENT.code){
            return CURRENT.desc;
        }else {
            return APPOINTMENT.desc;
        }
    }
}
